1. Field of the Invention
The present invention relates to a numerical controller for generating a machining cycle command from a part of a numerical control program (NC program) and to a program editing method for generating a machining cycle command from a part of an NC program.
2. Description of the Related Art
When creating an NC program for machining a workpiece, an operator has to calculate a start point and end point of a tool move path and create a relevant move command for each block. The block is a minimum unit of the NC program for designating a path.
The workpiece is machined by executing the above-described NC program. However, even when machining is actually being conducted, the NC program is often corrected or edited as needed to obtain optimal cutting conditions and others. In such an instance, the operator specifies a plurality of blocks related to machining commands and edits each of the specified blocks as needed.
In addition to a technology for directly editing an NC program, there is a technology for automatically generating data that can be input from an NC program to an NC program creation apparatus such as CAD/CAM apparatus and an automatic programming apparatus, as described, for instance, in Japanese Patent No. 3650027 (corresponding to WO 2000/011528). Further, a technology described, for instance, in Japanese Patent Application Laid-Open No. 63-293607 makes it possible to indirectly edit an NC program by extracting graphic data from the NC program and editing the graphic data on a CAD apparatus.
Meanwhile, a machining cycle command is used in a machining program. The machining cycle command is configured so that a series of move commands formed of a plurality of blocks are executed by a single command, as disclosed in, for example, in Japanese Patent Application Laid-Open No. 2014-16982. The machining cycle command defines cutting conditions and the figure of a machining area. A numerical controller for controlling a machine tool controls a movable axis by generating a plurality of move commands from the cutting conditions and machining area figure defined by the machining cycle command described in the machining program.
However, there are the following problems with conventional NC program editing method. When a workpiece is to be machined, one machine figure is formed by performing an considerable number of machining control operations with respect to each block of the NC program. As such being the case, when the NC program is to be edited, all relevant blocks need to be identified by understanding machining sequence executed by the NC program. Therefore, the identification of the blocks to be edited is time-consuming. In addition, it is necessary to edit an considerable number of blocks.
Further, introducing a technology for providing editing assistance by using a CAD/CAM apparatus or an automatic programming apparatus eliminates the necessity of directly editing individual blocks and provides labor savings by lightening a program-editing task to be performed by an operator. However, if such a technology is to be introduced, it becomes necessary to prepare large-scale equipment, such as a CAD/CAD apparatus and an automatic programming apparatus, in addition to a numerical controller. This causes a cost problem.